Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

223 metadata injector #252

Merged
merged 10 commits into from
Jan 29, 2025
Merged

223 metadata injector #252

merged 10 commits into from
Jan 29, 2025

Conversation

jr1221
Copy link
Contributor

@jr1221 jr1221 commented Nov 29, 2024

Changes

Adds a metadata injector. It basically splits off socket functionality from mqtt_processor into its own file, and hides the metadata behind a flag.

Currently, the timers socketIO key:

{
  "topic": "BMS/Charging/Control",
  "last_change": "2025-01-18T02:40:09.521458544Z",
  "last_value": 0
}

Currently, the faults socketIO key (sample):

[
  {
    "node": "Bms",
    "name": "DCL_Enforce",
    "occured_at": "2025-01-18T02:39:36.972566Z",
    "last_seen": "2025-01-18T02:40:09.506620Z",
    "expired": false
  },
  {
    "node": "Bms",
    "name": "External_Can",
    "occured_at": "2025-01-18T02:39:36.972585Z",
    "last_seen": "2025-01-18T02:40:09.506653Z",
    "expired": false
  },
  {
    "node": "Bms",
    "name": "Charge_Reading",
    "occured_at": "2025-01-18T02:39:36.972731Z",
    "last_seen": "2025-01-18T02:40:09.506750Z",
    "expired": false
  },
]

Currently

Notes

  • The fault and timer re-use and buffering logic is shaky and uses some assumptions: A fault that does not broadcast in 8+ seconds is considered a new fault. A timer cannot be a fault. There will never be more than 25 concurrent faults (lol).
  • Depends on [CANGEN] - Implement MPU Faults as bitwise Embedded-Base#225 for MPU faulting to be detected.

To Do

Any remaining things that need to get done

  • Figure out what to do about latency sender

Checklist

  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No package-lock.json changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #223
Closes #207

@jr1221 jr1221 force-pushed the 223-metadata-injector branch from dc6bd5f to 128b451 Compare December 20, 2024 02:58
@jr1221 jr1221 marked this pull request as ready for review January 18, 2025 02:46
@jr1221 jr1221 self-assigned this Jan 18, 2025
@jr1221 jr1221 requested review from bracyw and Peyton-McKee January 18, 2025 02:46
Copy link
Contributor

@bracyw bracyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. minor questions we can talk about tonight if your pulling up. Didn't test yet on my end.

scylla-server/src/socket_handler.rs Outdated Show resolved Hide resolved
scylla-server/src/socket_handler.rs Outdated Show resolved Hide resolved
scylla-server/src/socket_handler.rs Outdated Show resolved Hide resolved
scylla-server/src/socket_handler.rs Outdated Show resolved Hide resolved
@jr1221 jr1221 requested a review from bracyw January 29, 2025 00:06
Copy link
Contributor

@bracyw bracyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - test using postman

@bracyw bracyw merged commit 00fba67 into develop Jan 29, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants